package android.javaClasses;

import java.io.Serializable;
import java.util.ArrayList;

/**
 * Created by IntelliJ IDEA.
 * User: michelle
 * Date: 4/23/11
 * Time: 5:41 PM
 * To change this template use File | Settings | File Templates.
 */
public class Content implements Serializable {
    private String text;
    private int typeOfContent;
    private String playerName;
    private String winner;
    private ArrayList<String> players;
    private float xValue;
    private float yValue;
    private boolean finished;
    private boolean yourTurn;
    private int typeOfGame;
    private int numPlayers;

    private static final long SerialVersionUID = 1L;

    //Defines what the object contains
    public static final int SEND_USERNAME = 1;
    public static final int SEND_CHOSEN_CELL = 2;
    public static final int GAME_FINISHED = 3;
    public static final int START_STATUS = 4;


    public Content(String text) {
        this.text = text;
    }

    //Used for joining a game
    public Content(int typeOfContent, String playerName) {
        this.typeOfContent = typeOfContent;
        this.playerName = playerName;
    }

    //Used for sending the chosenCell to server, and to clients for them to update their view
    public Content(int typeOfContent, float xValue, float yValue) {
        this.typeOfContent = typeOfContent;
        this.xValue = xValue;
        this.yValue = yValue;
    }

    //Used to notify players that the game is over
    public Content(int typeOfContent, ArrayList<String> players,  String winner) {
        this.typeOfContent = typeOfContent;
        this.players = players;
        this.winner = winner;
    }

    public Content(int typeOfContent, int typeOfGame, int numPlayers) {
        this.typeOfContent = typeOfContent;
        this.typeOfGame = typeOfGame;
        this.numPlayers = numPlayers;
    }


    public String getText() {
        return text;
    }

    public void setText(String text) {
        this.text = text;
    }

    public int getTypeOfContent() {
        return typeOfContent;
    }

    public void setTypeOfContent(int typeOfContent) {
        this.typeOfContent = typeOfContent;
    }

    public String getPlayerName() {
        return playerName;
    }

    public void setPlayerName(String playerName) {
        this.playerName = playerName;
    }

    public String getWinner() {
        return winner;
    }

    public void setWinner(String winner) {
        this.winner = winner;
    }

    public ArrayList<String> getPlayers() {
        return players;
    }

    public void setPlayers(ArrayList<String> players) {
        this.players = players;
    }

    public boolean isFinished() {
        return finished;
    }

    public void setFinished(boolean finished) {
        this.finished = finished;
    }

    public boolean isYourTurn() {
        return yourTurn;
    }

    public void setYourTurn(boolean yourTurn) {
        this.yourTurn = yourTurn;
    }

    public float getxValue() {
        return xValue;
    }

    public void setxValue(int xValue) {
        this.xValue = xValue;
    }

    public float getyValue() {
        return yValue;
    }

    public void setyValue(int yValue) {
        this.yValue = yValue;
    }

    public int getTypeOfGame() {
        return typeOfGame;
    }

    public void setTypeOfGame(int typeOfGame) {
        this.typeOfGame = typeOfGame;
    }

    public int getNumPlayers() {
        return numPlayers;
    }

    public void setNumPlayers(int numPlayers) {
        this.numPlayers = numPlayers;
    }
}

